1. Field of the Invention
The field of the invention is data processing, or, more specifically, methods and apparatuses for utilizing error correcting code data associated with a region of memory.
2. Description of Related Art
A need often arises for a computer processor to determine whether a section of memory matches another section of memory. For example, a processor may create multiple copies of a page of data with each copy corresponding to a particular execution thread of the processor. To reduce the amount of memory space consumed, however, the processor may desire the threads to share a single copy of the data when possible. In order for the processor to reduce the multiple pages into a single copy, the processor may first seek to determine if the multiple pages are identical. One way to determine whether any two (or more) sections of memory are identical would be simply to go through the entire memory at predetermined times and compare the contents of every possible section pair and remove all redundant copies.
In contrast to the time consuming process of comparing each possible section pair, a hash function may be used to generate a hash value representing the content of one section to compare to another hash value representing the content of another section. Sections with different contents will generate different hash values, and thus not need to be compared to each other. The number of iterations required for this hash comparison is dependent on the size of the data within the regions. The size of the data being hashed, therefore, plays an important role in the number of iterations required to perform the comparison, and thus the overall performance of the processor performing the hash comparison.